const doSync = (sth, time) => new Promise(resolve => {
  setTimeout(() => {
    console.log(sth + '用了 ' + time + ' 毫秒')
    resolve()
  }, time)
})

const doElse = (sth) => {
  console.log(sth)
}

const Tao = {
  doSync,
  doElse
}
const Meizi = {
  doSync,
  doElse
}

;
(async () => {
  console.log('case 1: 妹子来到门口')
  await Tao.doSync('Tao 刷牙', 1000)
  console.log('啥也没干，一直等')
  await Meizi.doSync('妹子洗澡', 2000)
  Meizi.doElse('妹子去忙别的了')
})()